//
//  SSSSSSMerchantTodayBenefitViewCellModel.m
//  SSSMerchant
//
//  Created by xnxin on 2017/3/22.
//  Copyright © 2017年 xnxin. All rights reserved.
//

#import "SSSMerchantTodayBenefitViewCellModel.h"

@implementation SSSMerchantTodayBenefitViewCellModel

- (NSString *)associatedCls {
    return @"SSSMerchantTodayBenefitViewCell";
}

+ (NSDictionary<NSString *, id> *)modelCustomPropertyMapper {

    NSMutableDictionary *mapDic = [[super modelCustomPropertyMapper] mutableCopy];
    mapDic[@"date"] = @"createTime";
    mapDic[@"discount"] = @"rangli";
    return [mapDic copy];
}

- (NSString *)discountDisplayValue {
    return [NSString stringWithFormat:@"上传比例%.2f%%", self.discount.floatValue * 100];
}

- (NSString *)orderSourceDisplayValue {
    switch (self.orderSource) {
        case SSSOrderSourceQRCode:
            return @"扫码";
        case SSSOrderSourceUpload:
            return @"录单";
    }
}
@end
